The invention relates generally to a method and apparatus for the scaling of digital image data. In particular, the invention relates to a method of enhancing image quality in images reproduced in a display format that differs from the original image format.
Digital video images such as those seen on computer display monitors are typically formatted according to industry standards (e.g., VGA, SVGA and XGA). Each standard defines various resolutions. Commonly, many different resolutions are supported by computer displays, however, flat panel displays and fixed resolution cathode ray tubes (CRTs) generally do not support multiple resolutions.
Digital image data can be scaled to make it compliant with the requirements of different standards. For example, VGA (640xc3x97480) data is scaled by a factor of 1.6 to fill a fixed XGA (1024xc3x97768) display. In some cases the source image resolution is higher than the monitor and must be scaled down. Some display devices are not capable of scaling images and thus only use a portion of the display area or a subset of the source image data.
A basic scaling technique is pixel replication which exhibits dramatic artifacts for fractional scale factors. Other traditional scaling algorithms do not provide maximum quality for fixed resolution monitors. The resulting images often appear out of focus or reveal jagged edges.
The present invention features a method and apparatus for scaling and enhancing a digital image has been developed which is useful in a wide variety of applications including, but not limited to, adapting digital image data for various video formats. The method and apparatus can be used to enhance the display of digital image data by smoothing the jagged edges inherent in digital images.
In one aspect, the invention features a method for enhancing a digital image. The method includes the steps of receiving a digital source image; selecting, for each output pixel, a block of source pixels having a center pixel which overlaps the output pixel; detecting edges in the block to generate an edge array; and processing the edge array to generate an effective source location for the output pixel. In one embodiment of the method, the step of processing the edge array includes applying a set of logic operations to detect a feature. In another embodiment, the method further includes the step of calculating an output value based on the value of at least one source pixel within the block. The step of calculating an output pixel value can include interpolating the output pixel value based on the values of four adjacent pixels within the block. In another embodiment, the method includes the additional step of modifying the effective source location to generate a modified effective source location based on a predetermined modifier function.
In another embodiment, the method includes the steps of receiving a digital source image; determining a source location for each output pixel; modifying the source location based on a predetermined modifier function to generate a modified source location; and interpolating an output pixel value based on the source pixel values of a block of four adjacent pixels relative to the modified source location.
In another aspect, the invention features an apparatus for enhancing a digital image. The apparatus includes an image buffer for receiving and storing source pixels. An edge detector module is coupled to the image buffer and receives, for each output pixel, a block of source pixels which has a center pixel that overlaps the output pixel. The edge detector generates arrays of horizontal and vertical edge values from the block. A memory buffer is coupled to the edge detector module and stores the array values. A processor is coupled to the memory buffer and generates an effective source location for each output pixel using the array values. In one embodiment, the processor also modifies the effective source location based on a predetermined modifier function. In another embodiment, the apparatus also includes a flat panel display coupled to the processor for graphically displaying the output pixel value.